package com.example.spring.thread.interrupt;

/**
 * @author: orange
 * @create: 2023-08-04 21:56
 * @description:
 */
public class InterruptException implements Runnable {
    @Override
    public void run() {
        try {
            while (!Thread.currentThread().isInterrupted()) {
                Thread.sleep(100000);
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
            Thread.currentThread().interrupt();
        }
    }
}
